home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 Super Collection / Windows 95 Super Collection.iso / win95 / internet / netcache / netcache.txt < prev   
Encoding:
Text File  |  1995-02-21  |  11.9 KB  |  327 lines

  1.                     Netcache V0.21 alpha        21/2/95
  2.  
  3.     Thank you for downloading the Netcache utility program. This program when 
  4. run in conjunction with the Netscape Navigator (tm) will allow offline reading 
  5. of world wide web pages via Netscape.
  6.  
  7. Any comment,suggestions for improvement and bug reports should be sent via 
  8. private e-mail to me at
  9.  
  10. nmott@cix.compulink.co.uk
  11.  
  12. and I will attempt to address them.
  13.  
  14. This program although written and copyright by myself is FREEWARE. Please feel 
  15. free to distribute (or not) to whomever you wish. If you do,however, I would 
  16. request that you make no modification to the executable or documentation 
  17. without my consent and that it is ditributed in the original ZIP archive 
  18. format supplied such that the code and documentation will remain together.
  19.  
  20. Other than that I hope you find the program useful and enjoyable as I have 
  21. done in producing it
  22.  
  23. Thanks
  24.         Neil Mottershead
  25.  
  26. ------------------------------------------------------------------------------
  27.  
  28. Features of Netcache V0.1 alpha
  29.  
  30.     Copies all files from netscape cache into separate directory and renames 
  31. them to sensible(ish) dos names.
  32.  
  33.     Parses all html files and converts pages and image references to file 
  34. references.
  35.  
  36.     Generates a report of missing images and orphaned images
  37.  
  38.     Generates a netscape history file of all available cached pages
  39.  
  40.     Allows manual addition and linking of page/image files
  41.  
  42. ------------------------------------------------------------------------------
  43.  
  44. Additions for Netcache V0.2
  45.  
  46.     All pages and images are now copied to the same directory and the parsed 
  47. html files no longer contain path information.
  48.  
  49.     Additional option to delete html references to non existant images to 
  50. avoid stalling netscape when viewing. 
  51.  
  52.     Addtional option to delete all inline image references from the pages
  53.  
  54.     Addiional option to show directory of cached pages
  55.  
  56.     Additional option to copy pages to another path (with inline images)
  57.  
  58.     Addional option to force reparsing of all html files
  59.  
  60. Additions for Netcache V0.21
  61.  
  62.     Addition of optional cache directory specifier
  63.  
  64.     Modification of url parser to cope with some strange urls
  65.  
  66.     Reduction of heap usage to allow handling of larger cache directories
  67.  
  68. ------------------------------------------------------------------------------
  69.  
  70. Configuring Netcache
  71.  
  72.  
  73.     The netcache program requires a configuration file to tell it the location 
  74. of the netscape directory and  where to write then database of  cached pages 
  75. and images.
  76.  
  77.     The configuration file is called netcache.cfg and must reside in the same 
  78. directory as netcache.
  79.  
  80.     You must manually create the directory that will receive the image/pages 
  81. generated by netcache.
  82.  
  83.     I suggest that the netcache program/config file lives in the same 
  84. directory as netscape and that the netcache files are placed in a subdirectory 
  85. of the netscape directory called netcache.
  86.  
  87.     The config file is an ascii file with four lines
  88.  
  89.     <path to images> 
  90.     <path to pages>
  91.     <path to netscape>
  92.     <path to netscape cache>
  93.  
  94.     A typical config file would be
  95.  
  96.     c:\easynet\netscape\netcache\
  97.     c:\easynet\netscape\netcache\ 
  98.     c:\easynet\netscape\
  99.     c:\easynet\netscape\cache\
  100.  
  101.     This specifies that copied pages/images go into the directory 
  102.  
  103.         c:\easynet\netscape\netcache
  104.  
  105.     whilst the netscape files are located in directory
  106.  
  107.         c:\easynet\netscape
  108.  
  109.     The netscape cache is to be in directory    
  110.  
  111.         c:\easynet\netscape\cache
  112.  
  113. ------------------------------------------------------------------------------ 
  114. Running Netcache
  115.  
  116.     Once configured, netcache can be run by typing the following at a dos 
  117. prompt.
  118.  
  119.     Netcache
  120.  
  121.     The program will then process all files in the netscape cache directory 
  122. modifying them and then copying them to netcache directory
  123.  
  124.     To view the resultant pages fire up netscape and select 
  125.  
  126.     File/Open File 
  127.  
  128.     menu item or press <Ctrl> O
  129.  
  130.     Select the netcache directory using the mouse to display a list of 
  131. available pages and click to view it.
  132.  
  133.     The page will now be displayed complete with inline images.
  134.  
  135.     Once the netscape cache has been processed it can be deleted with a
  136.  
  137.     del *.* 
  138.  
  139.     Sometimes the netcache directory does not contain all the necessary files 
  140. to display a web page, ie there are missing images.  If this happens netscape 
  141. will attempt to retrieve the file from the server. As netscape is offline, it 
  142. will obviously not be able to contact the server and will appear to hang. To 
  143. view the page click on the netscape 'Stop' button to abort the connect. See 
  144. later for ways to overcome this problem. 
  145.  
  146. ------------------------------------------------------------------------------ 
  147. Netcache operation
  148.  
  149.     As well as renaming the netscape cache entries to meaningful dos names, 
  150. netcache also attempts to assist Netscape to find and display inline images 
  151. and linked pages.
  152.  
  153. Netcache also builds up an index of pages and images in the page.idx and image.
  154. idx. For each image/page there is one line that holds the filename and the 
  155. site / page / name of the entry.  If you wish to delete any files from the 
  156. netcache directory (ie orphan images) I strongly recommend editing the 
  157. relevent .idx file and killing its entry by deleting the line and resaving.
  158.  
  159.     Within a html document an inline image or linked page is reference with an 
  160. embedded command like the ones below
  161.  
  162.     <img src = http://www.easynet.co.uk/icons/easylogo.gif>
  163.     <A HREF=pages/tourist/tour.htm>
  164.  
  165.     This tells netscape where to find the page/image, in this case on a world 
  166. wide web server.
  167.  
  168.     When netscape loads this page, it puts it in the netscape cache with an 
  169. internal name, and writes a reference to it to a file call FAT that also lives 
  170. in the netscape cache directory.It than does the same thing for all the inline 
  171. images used within that page.  However, I believe that once you quit netscape 
  172. and then start a new session, it does not attempt to use this cache info for 
  173. reasons beyond my comprehension.
  174.  
  175.     Netcache recovers this cache information and builds it's own cache 
  176. database. In order for netscape to know that the files are now on the disk the 
  177. html files have to be amended 
  178.  
  179.     <IMG SRC=file:/easylogo.gif>
  180.     <A HREF=file:/tour.htm>
  181.  
  182.     This tells netscape that the files are located in the current directory 
  183. and not on the web server.
  184.  
  185. Sometimes netscape deletes files from its cache just prior to exiting the 
  186. program for reasons unknown to me.  It is possible to recover these images if  
  187. you run an Undelete program on the cache directory. You will unfortunately 
  188. have no immediate information about the nature of these files, but with a 
  189. little ingenuity it is possible to identify them and netcache provides a 
  190. mechanism for manually inserting them into the database.
  191.  
  192. ------------------------------------------------------------------------------ 
  193.     Netcache options
  194.  
  195.     The following options affect the conversion process from the netscape 
  196. cache to the netcache directory
  197.  
  198.  
  199.     Netcache /P
  200.  
  201.         This option causes any inline image references to be deleted from the 
  202. modified page when the image is not present in the cache.
  203.  
  204.     Netcache /A
  205.  
  206.         This option causes all pages to be reparsed irrespective of whether or 
  207. not any pages/images have been added. You will need to specify this option if 
  208. you wish to apply the /P option AFTER you have converted the pages.
  209.  
  210.  
  211.     Netcache /L
  212.  
  213.         This option (Lynx mode) will strip all inline graphics from converted 
  214. pages leaving just the text and page links. It must be specified with the /P 
  215. option to work in any meaningful way.
  216.  
  217.  
  218. The following options work on the converted image/page database in the 
  219. netcache directory and not with the netscape cache directory files 
  220.     
  221.     Netcache /F <filename> <url> <type>
  222.  
  223.         This option allows the user to manually add an image/page to the 
  224. database.  This is extremely useful in the case where an inline image has not 
  225. been downloaded and you wish to install an image manually rather than delete 
  226. the image reference with the /P option.
  227.  
  228. Adding an image manually is a two stage process,firstly you must aquire the 
  229. image to be installed and secondly you must copy and link it into the database.
  230.  
  231. As an example, let us say that we have the htp file cafe.htm and that it is 
  232. missing the inline image 'minicyb.gif'
  233.  
  234. Image Aquisition
  235.  
  236. There are three options open to us
  237.  
  238. a/  Undelete option.
  239.  
  240.     Use an Undelete utility in the netscape cache directory and examine each 
  241. of the undelete .MOZ files for a gif header (GIF87 or GIF89).  These files can 
  242. then be renamed to .GIF and viewed using a gif viewer. If we have a rough idea 
  243. of the nature of the image it should be fairly straight forword to identify it 
  244. and then to rename it to 'minicyb.gif'.
  245.  
  246. b/ Web retrieval
  247.  
  248. Find the full http specification of the image either by examining cafe.htm or  
  249. by viewing the netcache .RPT report file section on missing images which in 
  250. this case would be
  251.  
  252. http://www.easynet.co.uk/icons\minicyb.gif
  253.     
  254.     Connect to your provider and open this as a url and netscape will retreive 
  255. it and save it straight to disk.
  256.  
  257. c/  Improvisation
  258.  
  259.     Take any .gif file on hand similar to the one required and copy it to 
  260. 'minicyb. gif'. When the missing image is just a bulleting image (ie blueball.
  261. gif) then it is perfectly acceptable to borrow a similar image from a 
  262. different page and reuse it.
  263.  
  264. Insertion in database
  265.  
  266.     Now that we have got our image we need to install it in the database. As 
  267. outlined before the usage is 
  268.  
  269.     Netcache /f  filename url image/text 
  270.  
  271.     in our case this would become
  272.  
  273. Netcache /f minicyb.gif http://www.easynet.co.uk/icons\minicyb.gif image
  274.  
  275. The source .gif file must reside in the netcache program directory and 
  276. netcache will then copy it to the netcache file directory and will reparse all 
  277. htm files and update any links to the image. This will obviously not work if 
  278. you have run netcache with the /P option to delete missing image references so 
  279. be warned.
  280.  
  281. Page references can similarly be added but the last command line parameter 
  282. must be changed from 'image' to 'text' so that the reference is added to the 
  283. correct index.
  284.  
  285.  
  286.     Netcache /d  match-pattern
  287.  
  288.         netcache will printout the name of pages held in it's netcache 
  289. directory and has a wildcard selection mechanism
  290.  
  291.     Netcache /d *                           displays all pages
  292.     Netcache /d   /                         display all home pages
  293.     Netcache /d http://www.easynet.co.uk    displays easynet pages
  294.     Netcache /d  index    displays the full url of all pages called index
  295.     Netcache /d   /stargate/*     will list all pages with the stargate path
  296.  
  297.  
  298.     Netcache /c match-pattern path
  299.  
  300.         netcache will copy all matching pages(complete with their inline 
  301. images) to the specified path
  302.  
  303.     Netcache /d  index a:\
  304.  
  305.         will copy the any index pages (with images) to the A drive.
  306.  
  307. ------------------------------------------------------------------------------
  308.  Netcache /H
  309.  
  310.         This option display the copyright banner.
  311.  
  312. ------------------------------------------------------------------------------
  313.  
  314. Summary of command line options
  315.  
  316. Netcache                        Default operation
  317. Netcache /A /P                  Strip refs to missing inline images
  318. Netcache /A /L /P               Strip refs to all inline images
  319. Netcache /F filename url type   Manually insert page/image into database
  320. Netcache /D url-pattern         List cached web pages
  321. Netcache /C url-pattern path    Copy cached web pages to another drive/directry
  322. Netcache /H                     Display help/copyright banner
  323. Netcache /G                     Windows in-joke
  324.  
  325. ------------------------------------------------------------------------------
  326.  
  327.